package com.joseph.controller;

import javax.annotation.Resource;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.joseph.base.BaseController;
import com.joseph.model.User;
import com.joseph.service.OrderService;
import com.joseph.service.UserService;

/**
 * @description 
 * @author Joseph_Mok
 * @date 2016年1月20日下午3:01:39
 */

@Controller
public class MainController extends BaseController {

	@Resource
	private UserService userService;
	
	@Resource
	private OrderService orderService;
	
	@ResponseBody
	@RequestMapping(value="/user/getUserInfo")
	public User getUserInfo(User user) {
		System.out.println("方法体");
		//Subject subject = SecurityUtils.getSubject();
		//System.out.println(subject.getSession());
		//userService.findAll();
		return user;
	}
	
	@RequestMapping(value="/order/updateOrder")
	public Object updateOrder() {
		orderService.updateStatus();
		return "OK";
	}
}
